﻿//==================================================================
// Copyright (C) 2011 深圳市中旭企业管理股份有限公司
// 文件名: CrmDeliverMajorProject.cs
// 作 者：代码自动生成
// 日 期：2012-5-9 17:30:28
// 描 述：
// 版 本：1.00
// 修改历史纪录
// 版 本  修改时间      修改人            修改内容
// 1.00             
//==================================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel;
using System.Text;
using Csla;
using lite;
using Csla.Validation;
using Csla.Data;
using System.Data.SqlClient;
using ZX.DAL;
using OpenExpressApp.ORM;

namespace ZX.CRM.Library
{
    /// <summary>
    /// 交付申请单----项目
    /// </summary>
    [Serializable]
    [Table(Name = "CrmDeliverMajorProject")]
    [ZX.DBModule.Table("CrmDeliverMajorProject", "ID")]
    public class CrmDeliverMajorProject : ZX.DBModule.BaseEntity
    {

        #region Business Methods 业务方法

        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<Guid> IDProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("ID"));
        [DataObjectField(true, true)]
        [Column, PK]
        public Guid ID
        {
            get { return GetProperty(IDProperty); }
            set { SetProperty(IDProperty, value); }
        }

        /// <summary>
        /// 编号
        /// </summary>
        private static PropertyInfo<string> CodeProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("Code"));
        [Column]
        public string Code
        {
            get { return GetProperty(CodeProperty); }
            set { SetProperty(CodeProperty, value); }
        }
        /// <summary>
        /// 申请日期
        /// </summary>
        private static PropertyInfo<DateTime> AddTimeProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("AddTime"));
        [Column]
        public DateTime AddTime
        {
            get { return GetProperty(AddTimeProperty); }
            set { SetProperty(AddTimeProperty, value); }
        }
        /// <summary>
        /// 订单产品ID
        /// </summary>
        private static PropertyInfo<Guid> OrderProductIDProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("OrderProductID"));
        [Column]
        public Guid OrderProductID
        {
            get { return GetProperty(OrderProductIDProperty); }
            set { SetProperty(OrderProductIDProperty, value); }
        }
        /// <summary>
        /// 负责交付人
        /// </summary>
        private static PropertyInfo<Guid> ClassFrontServerProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("ClassFrontServer"));
        [Column]
        public Guid ClassFrontServer
        {
            get { return GetProperty(ClassFrontServerProperty); }
            set { SetProperty(ClassFrontServerProperty, value); }
        }
        /// <summary>
        /// 项目经理
        /// </summary>
        private static PropertyInfo<Guid> PMProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("PM"));
        [Column]
        public Guid PM
        {
            get { return GetProperty(PMProperty); }
            set { SetProperty(PMProperty, value); }
        }
        /// <summary>
        /// 启动日期
        /// </summary>
        private static PropertyInfo<DateTime> BeginDateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("BeginDate"));
        [Column]
        public DateTime BeginDate
        {
            get { return GetProperty(BeginDateProperty); }
            set { SetProperty(BeginDateProperty, value); }
        }
        /// <summary>
        /// 项目成员
        /// </summary>
        private static PropertyInfo<string> PMememberProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("PMemember"));
        [Column]
        public string PMemember
        {
            get { return GetProperty(PMememberProperty); }
            set { SetProperty(PMememberProperty, value); }
        }
        /// <summary>
        /// 项目填写人
        /// </summary>
        private static PropertyInfo<Guid> ProjectUserProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("ProjectUser"));
        [Column]
        public Guid ProjectUser
        {
            get { return GetProperty(ProjectUserProperty); }
            set { SetProperty(ProjectUserProperty, value); }
        }
        /// <summary>
        /// 项目备注
        /// </summary>
        private static PropertyInfo<string> PExplainProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("PExplain"));
        [Column]
        public string PExplain
        {
            get { return GetProperty(PExplainProperty); }
            set { SetProperty(PExplainProperty, value); }
        }
        /// <summary>
        /// 项目填写时间
        /// </summary>
        private static PropertyInfo<DateTime> ProjectDateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("ProjectDate"));
        [Column]
        public DateTime ProjectDate
        {
            get { return GetProperty(ProjectDateProperty); }
            set { SetProperty(ProjectDateProperty, value); }
        }
        /// <summary>
        /// 实施天数
        /// </summary>
        private static PropertyInfo<decimal> DateSumProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<decimal>("DateSum"));
        [Column]
        public decimal DateSum
        {
            get { return GetProperty(DateSumProperty); }
            set { SetProperty(DateSumProperty, value); }
        }
        /// <summary>
        /// 结束日期
        /// </summary>
        private static PropertyInfo<DateTime> EndDateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("EndDate"));
        [Column]
        public DateTime EndDate
        {
            get { return GetProperty(EndDateProperty); }
            set { SetProperty(EndDateProperty, value); }
        }
        /// <summary>
        /// 实施填写人
        /// </summary>
        private static PropertyInfo<Guid> SsUserProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("SsUser"));
        [Column]
        public Guid SsUser
        {
            get { return GetProperty(SsUserProperty); }
            set { SetProperty(SsUserProperty, value); }
        }
        /// <summary>
        /// 实施填写日期
        /// </summary>
        private static PropertyInfo<DateTime> SsDateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("SsDate"));
        [Column]
        public DateTime SsDate
        {
            get { return GetProperty(SsDateProperty); }
            set { SetProperty(SsDateProperty, value); }
        }
        /// <summary>
        /// 实施备注
        /// </summary>
        private static PropertyInfo<string> SsExplainProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("SsExplain"));
        [Column]
        public string SsExplain
        {
            get { return GetProperty(SsExplainProperty); }
            set { SetProperty(SsExplainProperty, value); }
        }
        /// <summary>
        /// 成功度
        /// </summary>
        private static PropertyInfo<decimal> SucceedDegreeProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<decimal>("SucceedDegree"));
        [Column]
        public decimal SucceedDegree
        {
            get { return GetProperty(SucceedDegreeProperty); }
            set { SetProperty(SucceedDegreeProperty, value); }
        }
        /// <summary>
        /// 满意度
        /// </summary>
        private static PropertyInfo<int> WellDegreeProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<int>("WellDegree"));
        [Column]
        public int WellDegree
        {
            get { return GetProperty(WellDegreeProperty); }
            set { SetProperty(WellDegreeProperty, value); }
        }
        /// <summary>
        /// 市场部填写人
        /// </summary>
        private static PropertyInfo<Guid> DegreeUserProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("DegreeUser"));
        [Column]
        public Guid DegreeUser
        {
            get { return GetProperty(DegreeUserProperty); }
            set { SetProperty(DegreeUserProperty, value); }
        }
        /// <summary>
        /// 市场部填写时间
        /// </summary>
        private static PropertyInfo<DateTime> DegreeDateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("DegreeDate"));
        [Column]
        public DateTime DegreeDate
        {
            get { return GetProperty(DegreeDateProperty); }
            set { SetProperty(DegreeDateProperty, value); }
        }
        /// <summary>
        /// 市场部备注
        /// </summary>
        private static PropertyInfo<string> ExplainProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("Explain"));
        [Column]
        public string Explain
        {
            get { return GetProperty(ExplainProperty); }
            set { SetProperty(ExplainProperty, value); }
        }
        /// <summary>
        /// 填写人
        /// </summary>
        private static PropertyInfo<Guid> AddUserProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("AddUser"));
        [Column]
        public Guid AddUser
        {
            get { return GetProperty(AddUserProperty); }
            set { SetProperty(AddUserProperty, value); }
        }
        /// <summary>
        /// 交付单状态
        /// </summary>
        private static PropertyInfo<Guid> DliverStateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("DliverState"));
        [Column]
        public Guid DliverState
        {
            get { return GetProperty(DliverStateProperty); }
            set { SetProperty(DliverStateProperty, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<string> exp1Property = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("exp1"));
        [Column]
        public string exp1
        {
            get { return GetProperty(exp1Property); }
            set { SetProperty(exp1Property, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<string> exp2Property = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("exp2"));
        [Column]
        public string exp2
        {
            get { return GetProperty(exp2Property); }
            set { SetProperty(exp2Property, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<string> exp3Property = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("exp3"));
        [Column]
        public string exp3
        {
            get { return GetProperty(exp3Property); }
            set { SetProperty(exp3Property, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<string> exp4Property = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("exp4"));
        [Column]
        public string exp4
        {
            get { return GetProperty(exp4Property); }
            set { SetProperty(exp4Property, value); }
        }
        /// <summary>
        /// 流程ID
        /// </summary>
        private static PropertyInfo<string> WorkFlowIdProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("WorkFlowId"));
        [Column]
        public string WorkFlowId
        {
            get { return GetProperty(WorkFlowIdProperty); }
            set { SetProperty(WorkFlowIdProperty, value); }
        }
        /// <summary>
        /// 流程实例ID
        /// </summary>
        private static PropertyInfo<string> WorkFlowInsIdProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("WorkFlowInsId"));
        [Column]
        public string WorkFlowInsId
        {
            get { return GetProperty(WorkFlowInsIdProperty); }
            set { SetProperty(WorkFlowInsIdProperty, value); }
        }
        /// <summary>
        /// 任务ID
        /// </summary>
        private static PropertyInfo<string> WorkTaskIdProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("WorkTaskId"));
        [Column]
        public string WorkTaskId
        {
            get { return GetProperty(WorkTaskIdProperty); }
            set { SetProperty(WorkTaskIdProperty, value); }
        }
        /// <summary>
        /// 任务实例ID
        /// </summary>
        private static PropertyInfo<string> WorkTaskInsIdProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("WorkTaskInsId"));
        [Column]
        public string WorkTaskInsId
        {
            get { return GetProperty(WorkTaskInsIdProperty); }
            set { SetProperty(WorkTaskInsIdProperty, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<DateTime> LeaveProjectDateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("LeaveProjectDate"));
        [Column]
        public DateTime LeaveProjectDate
        {
            get { return GetProperty(LeaveProjectDateProperty); }
            set { SetProperty(LeaveProjectDateProperty, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<DateTime> ProejectPauseDateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("ProejectPauseDate"));
        [Column]
        public DateTime ProejectPauseDate
        {
            get { return GetProperty(ProejectPauseDateProperty); }
            set { SetProperty(ProejectPauseDateProperty, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<DateTime> ProjectRestartDateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("ProjectRestartDate"));
        [Column]
        public DateTime ProjectRestartDate
        {
            get { return GetProperty(ProjectRestartDateProperty); }
            set { SetProperty(ProjectRestartDateProperty, value); }
        }
        /// <summary>
        /// 0,不满意退款小于20%;1,退款大于等于20%
        /// </summary>
        private static PropertyInfo<int> UnSatisfyProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<int>("UnSatisfy"));
        [Column]
        public int UnSatisfy
        {
            get { return GetProperty(UnSatisfyProperty); }
            set { SetProperty(UnSatisfyProperty, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<string> ServiceNameProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("ServiceName"));
        [Column]
        public string ServiceName
        {
            get { return GetProperty(ServiceNameProperty); }
            set { SetProperty(ServiceNameProperty, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<DateTime> ServiceDateProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<DateTime>("ServiceDate"));
        [Column]
        public DateTime ServiceDate
        {
            get { return GetProperty(ServiceDateProperty); }
            set { SetProperty(ServiceDateProperty, value); }
        }
        /// <summary>
        /// 0,未到场;1,到场
        /// </summary>
        private static PropertyInfo<int> AdvisorIsAtProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<int>("AdvisorIsAt"));
        [Column]
        public int AdvisorIsAt
        {
            get { return GetProperty(AdvisorIsAtProperty); }
            set { SetProperty(AdvisorIsAtProperty, value); }
        }
        /// <summary>
        /// 
        /// </summary>
        private static PropertyInfo<int> ServiceSatisfyProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<int>("ServiceSatisfy"));
        [Column]
        public int ServiceSatisfy
        {
            get { return GetProperty(ServiceSatisfyProperty); }
            set { SetProperty(ServiceSatisfyProperty, value); }
        }
        /// <summary>
        /// 列表
        /// </summary>
        private static PropertyInfo<string> ProduectListProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<string>("ProduectList"));
        //[Column]
        public string ProduectList
        {
            get { return GetProperty(ProduectListProperty); }
            set { SetProperty(ProduectListProperty, value); }
        }

        /// <summary>
        /// 客户经理
        /// </summary>
        private static PropertyInfo<Guid> CustomerMgrProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("CustomerMgr"));
        [Column]
        public Guid CustomerMgr
        {
            get { return GetProperty(CustomerMgrProperty); }
            set { SetProperty(CustomerMgrProperty, value); }
        }
        /// <summary>
        /// 客户总监
        /// </summary>
        private static PropertyInfo<Guid> CustomerDirectorProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("CustomerDirector"));
        [Column]
        public Guid CustomerDirector
        {
            get { return GetProperty(CustomerDirectorProperty); }
            set { SetProperty(CustomerDirectorProperty, value); }
        }
        /// <summary>
        /// 分总
        /// </summary>
        private static PropertyInfo<Guid> CustomerManagerProperty = RegisterProperty(typeof(CrmDeliverMajorProject), new PropertyInfo<Guid>("CustomerManager"));
        [Column]
        public Guid CustomerManager
        {
            get { return GetProperty(CustomerManagerProperty); }
            set { SetProperty(CustomerManagerProperty, value); }
        }
        #endregion

        #region Validation Rules 验证规则
        //将验证规则与业务对象的属性联系在一起
        protected override void AddBusinessRules()
        {
            //AddRule的第一个参数是委托变量，也就是说是方法的变量
            ValidationRules.AddRule(CommonRules.StringRequired, "Code");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("Code", 15));
            ValidationRules.AddRule(CommonRules.StringRequired, "PMemember");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("PMemember", 1000));
            ValidationRules.AddRule(CommonRules.StringRequired, "PExplain");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("PExplain", 200));
            ValidationRules.AddRule(CommonRules.StringRequired, "SsExplain");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("SsExplain", 200));
            ValidationRules.AddRule(CommonRules.StringRequired, "Explain");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("Explain", 200));
            ValidationRules.AddRule(CommonRules.StringRequired, "exp1");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("exp1", 100));
            ValidationRules.AddRule(CommonRules.StringRequired, "exp2");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("exp2", 100));
            ValidationRules.AddRule(CommonRules.StringRequired, "exp3");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("exp3", 100));
            ValidationRules.AddRule(CommonRules.StringRequired, "exp4");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("exp4", 100));
            ValidationRules.AddRule(CommonRules.StringRequired, "WorkFlowId");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("WorkFlowId", 50));
            ValidationRules.AddRule(CommonRules.StringRequired, "WorkFlowInsId");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("WorkFlowInsId", 50));
            ValidationRules.AddRule(CommonRules.StringRequired, "WorkTaskId");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("WorkTaskId", 50));
            ValidationRules.AddRule(CommonRules.StringRequired, "WorkTaskInsId");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("WorkTaskInsId", 50));
            ValidationRules.AddRule(CommonRules.StringRequired, "ServiceName");
            ValidationRules.AddRule(CommonRules.StringMaxLength, new Csla.Validation.CommonRules.MaxLengthRuleArgs("ServiceName", 50));
            //base.AddBusinessRules();
        }
        #endregion

        #region Factory Methods 工厂方法

        public CrmDeliverMajorProject() { }

        public static CrmDeliverMajorProject New()
        {
            return DataPortal.Create<CrmDeliverMajorProject>();
        }
        public static CrmDeliverMajorProject Get(Guid ID)
        {
            return DataPortal.Fetch<CrmDeliverMajorProject>(new SingleLazyCriteria<CrmDeliverMajorProject, Guid>(ID, false));
        }
        public static void Delete(Guid ID)
        {
            DataPortal.Delete(ID);
        }

        //public override CrmDeliverMajorProject Save()
        //{
        //return base.Save();
        //}
        #endregion

        #region Data Access 数据访问
        //由于DataPortal_create中没有对数据库的访问，所有标记了Runlocal特性，使得该方法只需在本地运行即可
        //如果代码中有访问数据库的方法，那么就不要用这个特性，使数据门户可以根据情况将此方法的运行选择在应用服务器还是本地
        [RunLocal()]
        protected override void DataPortal_Create()
        {
            //在此调用CheckRules对所有的属性进行验证规则的检查，这样检查只运行一次。
            ValidationRules.CheckRules();
        }


        //可以看到此方法没有标记任何特性
        //此方法要访问数据库所以不能标记本地，由于她没有任何数据库更新操作所以也无需事务性的保护
        //此方法调用结束后会隐含的调用MarkOld（）方法
        private void DataPortal_Fetch(Guid ID)
        {
            //通过连接字符串建立SQL连接对象，Using符号代表，范围释放的意思，SqlConnection对象会在此范围后被释放掉
            using (var ctx = ConnectionManager<SqlConnection>.GetManager(ConnectionStringNames))
            {
                IDb db = DbFactory.Instance.GetDb(ctx.Connection);
                IQuery q = db.Query();
                q.Constrain("ID").Equal(ID);
                var data = db.Select<CrmDeliverMajorProject>(q)[0];
                LoadProperty(IDProperty, data.ID);
                LoadProperty(CodeProperty, data.Code);
                LoadProperty(AddTimeProperty, data.AddTime);
                LoadProperty(OrderProductIDProperty, data.OrderProductID);
                LoadProperty(ClassFrontServerProperty, data.ClassFrontServer);
                LoadProperty(PMProperty, data.PM);
                LoadProperty(BeginDateProperty, data.BeginDate);
                LoadProperty(PMememberProperty, data.PMemember);
                LoadProperty(ProjectUserProperty, data.ProjectUser);
                LoadProperty(PExplainProperty, data.PExplain);
                LoadProperty(ProjectDateProperty, data.ProjectDate);
                LoadProperty(DateSumProperty, data.DateSum);
                LoadProperty(EndDateProperty, data.EndDate);
                LoadProperty(SsUserProperty, data.SsUser);
                LoadProperty(SsDateProperty, data.SsDate);
                LoadProperty(SsExplainProperty, data.SsExplain);
                LoadProperty(SucceedDegreeProperty, data.SucceedDegree);
                LoadProperty(WellDegreeProperty, data.WellDegree);
                LoadProperty(DegreeUserProperty, data.DegreeUser);
                LoadProperty(DegreeDateProperty, data.DegreeDate);
                LoadProperty(ExplainProperty, data.Explain);
                LoadProperty(AddUserProperty, data.AddUser);
                LoadProperty(DliverStateProperty, data.DliverState);
                LoadProperty(exp1Property, data.exp1);
                LoadProperty(exp2Property, data.exp2);
                LoadProperty(exp3Property, data.exp3);
                LoadProperty(exp4Property, data.exp4);
                LoadProperty(WorkFlowIdProperty, data.WorkFlowId);
                LoadProperty(WorkFlowInsIdProperty, data.WorkFlowInsId);
                LoadProperty(WorkTaskIdProperty, data.WorkTaskId);
                LoadProperty(WorkTaskInsIdProperty, data.WorkTaskInsId);
                LoadProperty(LeaveProjectDateProperty, data.LeaveProjectDate);
                LoadProperty(ProejectPauseDateProperty, data.ProejectPauseDate);
                LoadProperty(ProjectRestartDateProperty, data.ProjectRestartDate);
                LoadProperty(UnSatisfyProperty, data.UnSatisfy);
                LoadProperty(ServiceNameProperty, data.ServiceName);
                LoadProperty(ServiceDateProperty, data.ServiceDate);
                LoadProperty(AdvisorIsAtProperty, data.AdvisorIsAt);
                LoadProperty(ServiceSatisfyProperty, data.ServiceSatisfy);
                LoadProperty(ProduectListProperty, data.ProduectList);
                LoadProperty(CustomerMgrProperty, data.CustomerMgr);
                LoadProperty(CustomerDirectorProperty, data.CustomerDirector);
                LoadProperty(CustomerManagerProperty, data.CustomerManager);
            }
        }

        [Transactional(TransactionalTypes.TransactionScope)]
        protected override void DataPortal_DeleteSelf()
        {
            //依然是调用下面的方法删除的，只是他此时可以获得自己的Id
            DataPortal_Delete(IDProperty);
        }
        #endregion

    }
}

